/*--------------------- Layout and Typography ----------------------------*/
pre, tt, code {
  font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
  margin: 0; padding: 0;
}


/*---------------------- Syntax Highlighting -----------------------------*/
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
body .hll { background-color: #ffffcc }
body .c { color: #408080;  }  /* Comment */
body .err { border: 1px solid #FF0000; }         /* Error */
body .k { color: #954121; }                      /* Keyword */
body .o { color: #666666; }                      /* Operator */
body .cm { color: #408080;  } /* Comment.Multiline */
body .cp { color: #BC7A00; }                     /* Comment.Preproc */
body .c1 { color: #408080;  } /* Comment.Single */
body .cs { color: #408080;  } /* Comment.Special */
body .gd { color: #A00000; }                     /* Generic.Deleted */
body .ge {  }                 /* Generic.Emph */
body .gr { color: #FF0000; }                     /* Generic.Error */
body .gh { color: #000080; }  /* Generic.Heading */
body .gi { color: #00A000; }                     /* Generic.Inserted */
body .go { color: #808080; }                     /* Generic.Output */
body .gp { color: #000080; }  /* Generic.Prompt */
body .gs { }                  /* Generic.Strong */
body .gu { color: #800080; }  /* Generic.Subheading */
body .gt { color: #0040D0; }                     /* Generic.Traceback */
body .kc { color: #954121; }                     /* Keyword.Constant */
body .kd { color: #954121; }  /* Keyword.Declaration */
body .kn { color: #954121; }  /* Keyword.Namespace */
body .kp { color: #954121; }                     /* Keyword.Pseudo */
body .kr { color: #954121; }  /* Keyword.Reserved */
body .kt { color: #B00040; }                     /* Keyword.Type */
body .m { color: #666666; }                      /* Literal.Number */
body .s { color: #219161; }                      /* Literal.String */
body .na { color: #7D9029; }                     /* Name.Attribute */
body .nb { color: #954121; }                     /* Name.Builtin */
body .nc { color: #0000FF;}  /* Name.Class */
body .no { color: #880000; }                     /* Name.Constant */
body .nd { color: #AA22FF }                     /* Name.Decorator */
body .ni { color: #999999; }  /* Name.Entity */
body .ne { color: #D2413A; }  /* Name.Exception */
body .nf { color: #0000FF }                     /* Name.Function */
body .nl { color: #A0A000; }                     /* Name.Label */
body .nn { color: #0000FF; }  /* Name.Namespace */
body .nt { color: #954121; }  /* Name.Tag */
body .nv { color: #19469D }                     /* Name.Variable */
body .ow { color: #AA22FF; }  /* Operator.Word */
body .w { color: #bbbbbb }                      /* Text.Whitespace */
body .mf { color: #666666; }                     /* Literal.Number.Float */
body .mh { color: #666666; }                     /* Literal.Number.Hex */
body .mi { color: #666666; }                     /* Literal.Number.Integer */
body .mo { color: #666666; }                     /* Literal.Number.Oct */
body .sb { color: #219161; }                     /* Literal.String.Backtick */
body .sc { color: #219161; }                     /* Literal.String.Char */
body .sd { color: #219161;  } /* Literal.String.Doc */
body .s2 { color: #219161; }                     /* Literal.String.Double */
body .se { color: #BB6622; }  /* Literal.String.Escape */
body .sh { color: #219161; }                     /* Literal.String.Heredoc */
body .si { color: #BB6688; }  /* Literal.String.Interpol */
body .sx { color: #954121; }                     /* Literal.String.Other */
body .sr { color: #BB6688; }                     /* Literal.String.Regex */
body .s1 { color: #219161; }                     /* Literal.String.Single */
body .ss { color: #19469D }                     /* Literal.String.Symbol */
body .bp { color: #954121; }                     /* Name.Builtin.Pseudo */
body .vc { color: #19469D }                     /* Name.Variable.Class */
body .vg { color: #19469D }                     /* Name.Variable.Global */
body .vi { color: #19469D }                     /* Name.Variable.Instance */
body .il { color: #666666; }                     /* Literal.Number.Integer.Long */


/* Div wrapper for code blocks */
.code-block {
  font-size: 90%;
  line-height: 1.4em;
  overflow: auto;
  position: relative;
}

.code-comment-pair code pre {
  width: 100%;
}

.one-line:first-child,
.code-comment {
  display: inline-block;
  background-color: #e5e5e5;
  padding: 4px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.one-line:first-child {
  width: 60%;
}

.no-comment .one-line:first-child {
  background-color: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

.no-comment .one-line:first-child {
  margin-bottom: 0;
  width: 100%;
}

.one-line {
  padding-left: 4px;
}

/* Wrapper for every pairing of code and comment.
Used to catch the .code-comment-line inside of
a relatively positioned parent. */
.code-comment-pair {
  display: block;
  position: relative;
  clear: both;
  margin: 0 0 2px 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Div wrapper for code comments */
.code-comment {
  clear: right;
  color: #444;
  display: block;
  float: right;
  font-family: sans-serif;
  font-style: bold;
  margin-top: 0.0em;
  position: relative;
  width: 40%;
  padding-left: 1.0em;

  /* hack to remove 1px white space in Safari on Lion */
  /*left: -1px;*/
}

/* The code goes in here. */
.code-block code {
  clear: left;
  display: block;
  position: relative;
}


/* Stretch class for comments that point to multiple lines of code */
.stretch {
  background-color: #e5e5e5;
  padding: 4px;
}

.stretch .code-comment,
.stretch .one-line:first-child,
.stretch span.one-line {
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

.stretch span.one-line {
  padding-right: 4px;
  padding-left: 0;
}

.stretch .code-comment {
  padding-left: 1.0em;
}


.offset-up code {
  clear: both;
}

.offset-up span.one-line,
.offset-down span.one-line {
  width: 100%;
}

.offset-down span.one-line {
  width: 200%;
}

.offset-down code {
  float: left;
}

.offset-up .code-comment {
  position: absolute;
  /*float: right;*/
  right: 0;
  top: -10px;
  z-index: 1;
}

.offset-down .code-comment {
  float: right;
  clear: none;
  position: relative;
  margin-top: 2.1em;
  right: 0;
}

div.example code pre span[class],
div.example .code-comment {
  color: #fff;
}

div.example .toggle {
  color: #000;
}

div.example .source-code {
  background: transparent;
  background-color: #666;

}

div.example .one-line:first-child,
div.example .code-comment,
div.example .stretch {
  background-color: rgb(136,128,138);
}

div.example .no-comment .one-line:first-child {
  background: transparent;
}


.offset-up {
  overflow-y: visible;
  overflow-x: visible;
}